{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>流水管理</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="{:url('admin/finance/batch')}">
            <div class="form-group">
                <div class="col-xs-2 no-pd-r">
                    <input type="text" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入用户昵称或手机号">
                </div>

                <div class="col-xs-1 no-pd-l" style="margin-left: 10px">
                    <select name="type" class="form-control">
                        <option {if $Request.get.type == ''} selected {/if} value="-1">类型(全部)</option>
                        <option {if $Request.get.type == 'recharge'} selected {/if} value="recharge">充值</option>
                        <option {if $Request.get.type == 'deduction'} selected {/if} value="deduction">消费</option>
                    </select>
                </div>

                <button type="submit" class="btn btn-color">搜索</button>
            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">账号</th>
                <th class="text-center">昵称</th>
                <th class="text-center">手机号</th>
                <th class="text-center">类型</th>
                <th class="text-center">金额</th>
                <th class="text-center">备注</th>
                <th class="text-center">描述</th>
                <th class="text-center">操作时间</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($list)}
                {foreach $list as $v}
                <tr>
                    <td style="vertical-align: middle" >
                        {$v['custom']['username']}
                    </td>
                    <td style="vertical-align: middle" >
                        {$v['custom']['nickname']}
                    </td>
                    <td style="vertical-align: middle" class="text-center">
                        {$v['custom']['mobile']}
                    </td>
                    <td style="vertical-align: middle" class="text-center">
                        {$v['type_text']}
                    </td>
                    <td style="vertical-align: middle" class="text-center">
                        {if $v['type'] == 'recharge'}
                            <span style='color:red'>+ {$v['money']} </span>
                        {else}
                            <span style='color:deepskyblue'>- {$v['money']} </span>
                        {/if}
                    </td>
                    <td style="vertical-align: middle" class="text-center">
                        {$v['remark']}
                    </td>
                    <td style="vertical-align: middle" >
                        {$v['desc']}
                    </td>
                    <td style="vertical-align: middle" class="text-center">
                        {$v['create_time']}
                    </td>
                </tr>
                {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="9">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($list->render())}
        </div>
    </div>
</section>
{/block}

{block name="footer"}
<script>

</script>

{/block}